package com.chenfan.mcn.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author liuyang
 * @Date 2021/3/24
 * @Time 16:11
 * @Version V1.0
 **/
@AllArgsConstructor
@SuppressWarnings("AlibabaEnumConstantsMustHaveComment")
public enum YearAgreementChangeContentEnum {

    /**
     * 年框合同补充协议变更类型
     */

    CONTRACT_SUBJECT(1, "我司合同主体"),

    FAVOURED_POLICY(2, "优惠政策"),

    OTHER(3, "其他"),
    ;


    @Getter
    private final Integer type;

    @Getter
    private final String desc;

    public static YearAgreementChangeContentEnum getByType(Integer type) {
        for (YearAgreementChangeContentEnum value : YearAgreementChangeContentEnum.values()) {
            if (value.type.equals(type)) {
                return value;
            }
        }
        return null;
    }

    public static String getStatusName(Integer type) {
        YearAgreementChangeContentEnum item = getByType(type);
        return item != null ? item.desc : null;
    }

}
